<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var arr=[5,6,9,4,2,3,6,5,9]
    function del(arr){
        var brr=[];
        arr.forEach(function(ele,i){
            if(brr.indexOf(arr[i])==-1){
                brr.push(arr[i])
            }
        })
        return brr
    }
    console.log(del(arr));
    
</script>